home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / base / ltxguide.cls (.txt) < prev    next >
LaTeX Document  |  1997-04-24  |  8KB  |  180 lines

  1. % \iffalse meta-comment
  2. % Copyright 1993 1994 1995 1996 1997
  3. % The LaTeX3 Project and any individual authors listed elsewhere
  4. % in this file. 
  5. % For further copyright information, and conditions for modification
  6. % and distribution, see the file legal.txt, and any other copyright
  7. % notices in this file.
  8. % This file is part of the LaTeX2e system.
  9. % ----------------------------------------
  10. %   This system is distributed in the hope that it will be useful,
  11. %   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. %   For error reports concerning UNCHANGED versions of this file no
  14. %   more than one year old, see bugs.txt.
  15. %   Please do not request updates from us directly.  Primary
  16. %   distribution is through the CTAN archives.
  17. % IMPORTANT COPYRIGHT NOTICE:
  18. % You are NOT ALLOWED to distribute this file alone.
  19. % You are allowed to distribute this file under the condition that it
  20. % is distributed together with all the files listed in manifest.txt.
  21. % If you receive only some of these files from someone, complain!
  22. % Permission is granted to copy this file to another file with a
  23. % clearly different name and to customize the declarations in that
  24. % copy to serve the needs of your installation, provided that you
  25. % comply with the conditions in the file legal.txt.
  26. % However, NO PERMISSION is granted to produce or to distribute a
  27. % modified version of this file under its original name.
  28. % You are NOT ALLOWED to change this file.
  29. % \fi
  30. % Filename: ltxguide.cls
  31. % Author: Alan Jeffrey
  32. % Version: 0.12 1995/11/29
  33. % This is the document class for the LaTeX guides `LaTeX2e for authors'
  34. % and `LaTeX2e for class and package writers'.  The changes log is at
  35. % the end of the file.
  36. % Copyright 1994 Alan Jeffrey and the LaTeX3 project.  
  37. % This is a LaTeX2e document class.
  38. \NeedsTeXFormat{LaTeX2e}[1994/12/01]
  39. \ProvidesClass{ltxguide}[1995/11/29 Standard LaTeX class]
  40. % Input any local configuration file.
  41. \InputIfFileExists{ltxguide.cfg}
  42.   {\typeout         {**********************************************^^J%
  43.                      * Local configuration file ltxguide.cfg used *^^J%
  44.                      **********************************************}}
  45.   {\ClassInfo{ltxguide}{Local configuration file not found}}
  46. % All options are passed to the article class.
  47. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  48. \ProcessOptions
  49. \LoadClass{article}
  50. % No paragraph indentation, space between paragraphs.
  51. \setlength{\parindent}{0pt}
  52. \setlength{\parskip}{\medskipamount}
  53. % The names of some documents:
  54. \newcommand{\clsguide}{\LaTeXe{} for Class and Package Writers}
  55. \newcommand{\usrguide}{\LaTeXe{} for Authors}
  56. \newcommand{\fntguide}{\LaTeXe{} Font Selection}
  57. \newcommand{\cfgguide}{Configuration options for \LaTeXe{}}
  58. \newcommand{\modguide}{Modifying \LaTeX{}}
  59. \newcommand{\sourcecode}{\LaTeX: the program}
  60. \newcommand{\LaTeXbook}{\LaTeX: A Document Preparation System}
  61. \newcommand{\LaTeXcomp}{The \LaTeX{} Companion}
  62. % The SliTeX logo:
  63. \newcommand{\SLiTeX}{\textsc{Sli}\TeX}
  64. % A declaration of a command, in a box, set out into the margin.
  65. % Unfortunately, there is a bug with this command, which allows page 
  66. % breaks to happen after a \begin{decl}[DATE]: it is a bug with TeX that
  67. % makes it very difficult to get page-breaks correct near marginals,
  68. % especially at the end of a paragraph.
  69. \newenvironment{decl}[1][]%
  70.     {\par\small\addvspace{4.5ex plus 1ex}%
  71.      \vskip -\parskip
  72.      \ifx\relax#1\relax
  73.         \def\@decl@date{}%
  74.      \else
  75.         \def\@decl@date{\NEWfeature{#1}}%
  76.      \fi
  77.      \noindent\hspace{-\leftmargini}%
  78.      \begin{tabular}{|l|}\hline\ignorespaces}%
  79.     {\\\hline\end{tabular}\nobreak\@decl@date\par\nobreak
  80.      \vspace{2.3ex}\vskip -\parskip}
  81. % Run the toc tighter:
  82. \def\@starttoc#1{\begingroup
  83.   \makeatletter
  84.   \parskip\z@\@plus\p@\relax         % <----
  85.   \@input{\jobname.#1}\if@filesw
  86.   \expandafter\newwrite\csname tf@#1\endcsname
  87.              \immediate\openout
  88.                  \csname tf@#1\endcsname \jobname.#1\relax
  89.   \fi \global\@nobreakfalse \endgroup}
  90. % Some hacks with verbatim... NB: this would be better done with the
  91. % verbatim package, but this document has to run on any LaTeX
  92. % installation.
  93. \let\o@verbatim\verbatim
  94. \def\verbatim{%
  95.   \ifhmode\unskip\par\fi
  96. % \nopagebreak              % Overridden by list penalty
  97.   \ifx\@currsize\normalsize
  98.      \small
  99.   \fi
  100.   \o@verbatim
  101. % Here we extend the font-setting command to include making <> active
  102. % (ie adjusting the input encoding).
  103. \renewcommand \verbatim@font {%
  104.   \normalfont \ttfamily
  105.   \catcode`\<=\active
  106.   \catcode`\>=\active
  107. % Make |...| a synonym for \verb|...|.
  108. \RequirePackage{shortvrb}
  109. \MakeShortVerb{\|}
  110. % Make active <...> produce italics surrounded by angle brackets
  111. % (used in verbatim and \verb).
  112. % << produces a less-than, and >> produces a greater-than.
  113. \begingroup
  114.   \catcode`\<=\active
  115.   \catcode`\>=\active
  116.   \gdef<{\@ifnextchar<\@lt\@meta}
  117.   \gdef>{\@ifnextchar>\@gt\@gtr@err}
  118.   \gdef\@meta#1>{\m{#1}}
  119.   \gdef\@lt<{\char`\<}
  120.   \gdef\@gt>{\char`\>}
  121. \endgroup
  122. \def\@gtr@err{%
  123.    \ClassError{ltxguide}{%
  124.       Isolated \protect>%
  125.    }{%
  126.       In this document class, \protect<...\protect>
  127.       is used to indicate a parameter.\MessageBreak
  128.       I've just found a \protect> on its own.
  129.       Perhaps you meant to type \protect>\protect>?
  130.    }%
  131. \def\verbatim@nolig@list{\do\`\do\,\do\'\do\-}
  132. % Various forms of argument:
  133. \newcommand{\m}[1]{\mbox{$\langle$\it #1\/$\rangle$}}
  134. \renewcommand{\arg}[1]{{\tt\string{}\m{#1}{\tt\string}}}
  135. \newcommand{\oarg}[1]{{\tt[}\m{#1}{\tt]}}
  136. % Logos.
  137. \newcommand{\NFSS}{\textsf{NFSS}}
  138. \newcommand{\AmS}{$${\protect\the\textfont2 A}\kern-.1667em\lower
  139.          .5ex\hbox{\protect\the\textfont2 M}\kern
  140.          -.125em{\protect\the\textfont2 S}}
  141. \newcommand{\AmSLaTeX}{\mbox{\AmS-\LaTeX}}
  142. % Table of contents is two deep.
  143. \setcounter{tocdepth}{2}
  144. % Allow more flexibility about bad paragraphs.
  145. \tolerance500
  146. % Marginal notes for new features and description:
  147. % Changed to command and hacked by Chris to get better positioning and
  148. % a better chance of printing:
  149. \newcommand{\NEWfeature}[1]{%
  150.    \hskip 1sp \marginpar{\small\sffamily\raggedright
  151.      New feature\\#1}}
  152. \newcommand{\NEWdescription}[1]{%
  153.    \hskip 1sp \marginpar{\small\sffamily\raggedright
  154.      New description\\#1}}
  155. % That's it!
  156. \endinput
  157. % CHANGELOG
  158. % 24 May 1994, ASAJ: Turned the collection of macros used by
  159. %       usrguide and clsguide into a class.
  160. % 27 May 1994, ASAJ: Added the SliTeX logo.
  161. % 28 May 1994, ASAJ: Made << and >> produce < and > inside verbatim.
  162. %    Added ltxguide.cfg.
  163. % 29 May 1994, ASAJ: Added italic correction to <...>.
  164. %    Added \sourcecode.
  165. % 1 Jun 1994, ASAJ: Made toc run tighter, corrected bug with verbatim.
  166. % 28 Jun 1994, CAR: Restricted active <> to verb(atim).
  167. %    Removed ineffective \nopagebreak
  168. % 23 Sep 1994, ASAJ: Replaced \PassOptionsToPackage{article} with
  169. %    \PassOptionsToClass{article}.
  170. % 30 Oct 1994, ASAJ: Added environments NEWfeature and NEWdescription.
  171. % 20 Nov 1994, CAR: Changed NEWfeature and NEWdescription to improve
  172. %    alignment: pagebreaking still not working.
  173. % 14 Dec 1994, DPC: Add \par to verbatim redefinition.
  174. %      Reported by Ulrik Vieth.
  175. % 24 July 1995, CAR: Changed cfg messages.
  176. % 21 Sept 1995, \RequirePackage{shortvrb} for latex/1875
  177. % 22 Nov  1995, CAR: Corrected cfg loading.
  178. % 28 Nov  1995, CAR: Added \cfgguide and \modguide.
  179. % 29 Nov  1995, DPC: Make \small in verbatim conditional on \normalsize.
  180.